package com.ocom.mqsimple.business.account.impl;



import com.ocom.mqsimple.business.account.AccountProductService;
import com.ocom.mqsimple.utils.AccessRabbitProductUitl;
import com.ocom.mqsimple.utils.AccountRabbitProductUitl;
import lombok.extern.slf4j.Slf4j;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Slf4j
@Service
public class AccountProductServiceImpl implements AccountProductService {
	private Logger log = LoggerFactory.getLogger(AccountProductServiceImpl.class);


	@Autowired
	private AccountRabbitProductUitl accountRabbitProductUitl;

	/**
	 * 更改门禁权限
	 */
	@Transactional
	public void mqAddAccount(String msg) {

		log.info("初始化账号开始【{}】",msg);
		//消息队列调用减库存接口  优先级越高越先执行完
		accountRabbitProductUitl.addAccount(msg,10);
		log.info("初始化账号完成【{}】",msg);

	}
}
